If something is true in theory, it's true in essence. It may not be true when you get down to the details.
A theory is an idea that potentially explains something. Therefore, anything that exists or happens in theory exists or happens in the imagination, and it might not hold up in reality. In theory, all marriages seem like a good idea—but many end in divorce. In theory, a stock may seem advisable to buy—but it could fail. People use this expression when they're speculating. Theories are fine, but they must be tested to see if they really work.